ÄúµÄλÖãºÑ°ÃÎÍøÊ×Ò³£¾±à³ÌÀÖÔ°£¾VBScript£¾VBScript


objects constants operators statements functions properties methods






OPERATORS:  Is

Is

The Is operator is used to determine if two variables refer to the same object. The output is either True or False.

Code:
<% Set object1 = Request.ServerVariables("SCRIPT_NAME") %>
<% Set object2 = object1 %>
<% =object1 Is object2 %>

Output:
True

Code:
<% Set object1 = Server.CreateObject("Scripting.FileSystemObject") %>
<% Set object2 = Request.ServerVariables("SCRIPT_NAME") %>
<% =object1 Is object2 %>

Output:
False